import React from 'react';
import {Outlet,NavLink} from 'react-router-dom'
import useMyReducer from '../reducer';
import './index.css'
const Index = () => {
    const [state] =useMyReducer()
    return (
        <div>
            {/* 路由导航 */}
            <NavLink to="/city">{state.city}</NavLink>
            <NavLink className="nav"  to="/music/news">正在热映</NavLink>
            <NavLink className="nav"  to="/music/hot">即将上映</NavLink>
            <Outlet></Outlet>
        </div>
    );
}

export default Index;
